1. Field of the Invention
The invention relates generally to a computer system and, more particularly, to handling and completing direct memory access (DMA) commands.
2. Description of the Related Art
There are many methods to complete direct memory access (DMA) commands. Perhaps the simplest method is to have a counter that tracks the transfer size. When the size is zero, the DMA command can be completed. For complex DMA transfers, however, this method may not work well. For example, some DMA transfers should be completed before subsequent DMA transfers are initiated. Other DMA transfers do not have to be completed before subsequent DMA transfers are initiated.
Therefore, a need exists for reducing the latency in completing a DMA task, by optimizing the DMA transfers depending on the type of DMA commands.